from celery import Celery
# 检测django环境
import os
if not os.getenv('DJANGO_SETTINGS_MODULE'):
    os.environ['DJANGO_SETTINGS_MODULE'] = 'mall.settings'

app = Celery('celery_task')
app.config_from_object('celery_task.config')
app.autodiscover_tasks(['celery_task.sms','celery_task.email']) # 课件上用mail
